﻿@using Root.Models.Structs
@{
    Layout = "_Layout.cshtml";
    ViewBag.Title = "班级论坛";
}
<div style="text-align:center;margin:0 auto;width:1000px">
    <table style="margin: 0 auto; width: 1000px">
        @foreach (Article article in ViewBag.articles)
        {
            <tbody>
                <tr>
                    <td class="disdiv" width="800px" style="border: 2px solid; border-radius: 5px; max-width: 800px">
                        <div style="font-size:160%;word-break:break-all"><a href="/Articles/Show/@article.Id">@article.Msg</a></div>
                    </td>
                    <td class="disdiv" width="200px" style="border: 2px solid; border-radius: 5px; max-width: 200px;vertical-align:top">
                        <hr />
                        <div>
                            <span style="color:blue">@article.Name</span><br />
                            <span>@DateTime.Parse(article.Time).AddHours(ViewBag.time)</span><br />
                            <span>@article.IP</span><br />
                            <span>@article.Location</span>
                        </div>
                        <hr />
                    </td>
                </tr>
            </tbody>
        }
    </table>
    <br /><br /><br /><br /><br /><br /><br /><br /><br />
    <form method="post" action="/Articles/Add" onsubmit="GetIP()">
        @Html.AntiForgeryToken()
        <div style="margin:0 auto;border:1px dotted">
            <span>姓名：</span><input name="name" type="text" value="@ViewBag.cookie" /><br />
            <span>标题：</span><input name="title" type="text" /><br />
            <input type="submit" value="发帖" />
        </div>
        <p hidden="hidden" id="keleyivisitorip"></p>
        <input name="pid" type="hidden" value="0" />
        <input name="ip" type="hidden" id="ip" onload="GetIP()" />
    </form>
</div>